﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CCount
{
    class Program
    {
        static void Main(string[] args)
        {
            CCount count = new CCount();
            Console.Write("输入第一个数：\n");
            int a = Convert.ToInt32(Console.ReadLine());
            Console.Write("输入第2个数：\n");
            int b = Convert.ToInt32(Console.ReadLine());
            Console.Write("输入运算符号（+ - * / ）：\n");
            string type = Console.ReadLine();
            Console.Write(count.Sum(a, b, type) + "\n");
            Console.ReadLine();
        }
    }
    public class CCount
    {
        public int Sum(int a, int b, string type)
        {
            switch (type)
            {
                case "+":
                    return a + b; break;
                case "-":
                    return a - b; break;
                case "*":
                    return a * b; break;
                case "/":
                    return a / b; break;
                default:
                    return 0; break;
            }
        }
    }
}
